package com.read.util;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author sh-sunb6
 * @description 时间工具类
 * @date 2019-02-21 11:02
 */
public class DateUtil {

    public final static String yyyy_MM_dd = "yyyy-MM-dd";

    public final static String yyyy_MM_dd_HH_mm_ss = "yyyy-MM-dd HH:mm:ss";

    public static String dateToString(Date date, String formatStr) {
        return new SimpleDateFormat(formatStr).format(date);
    }

}
